package com.gdcn.zb.sys.dao.impl;

import java.util.List;

import com.gdcn.zb.base.BaseDao;
import com.gdcn.zb.base.exception.DaoException;
import com.gdcn.zb.sys.dao.IRoleDao;
import com.gdcn.zb.sys.valueobject.Role;

public class RoleDaoHibernate extends BaseDao implements IRoleDao {

	@Override
	protected Class getModelClass() {
		return Role.class;
	}

	public void createRole(Role role) throws DaoException {
		super.doCreateObject(role);
	}

	public void deleteRole(Role role) throws DaoException {
		super.doDeleteObject(role);

	}
	
	public void deleteRole(String id) throws DaoException {
		super.doDeleteObject(id);	
	}

	public Role findRoleById(String id) throws DaoException {
		return (Role)super.doFindObjectById(id);
	}

	public void updateRole(Role role) throws DaoException {
		super.doUpdateObject(role);
	}

	public List<Role> listRoleOfAll() throws DaoException {
		return doListAllObject();
	}

}
